import { useLoaderData } from "react-router-dom";
import { sleep } from "../../utils";

export async function loader() {
  await sleep();

  return {
    name: "主控台",
    age: 18,
  };
}

export default function DashboardConsole() {
  const data: any = useLoaderData();

  return (
    <div>
      <h2>主控台</h2>
      <p>Name: {data.name}</p>
      <p>Age: {data.age}</p>
    </div>
  );
}
